import '../utils/api/http.dart';
import '../utils/tools/localstorage_tool.dart';
import '../bean/voiceprintmonitor_bean.dart';

class VoiceprintmonitorModel {

  /// 获取声纹波动监测
  /// * [par] Map|必填|台区id
  static Future reqVoiceprintInfo(par) async {
    List<VoiceprintmonitorBean> list = [];
    String token = await LocalStorage.getStringItem("token");
    var res = await HttpManager.getInstance().get("soundanalyze/getSoundAnaluzeReal?token=${token}", params: par);
    if(res["data"] != null){
      res["data"].forEach((value){
        list.add(VoiceprintmonitorBean.fromJson(value));
      });
      return list;
    } else {
      return null;
    }
  }
}